package cn.gson.boot.model.dao;

import cn.gson.boot.model.pojos.Gong;
import cn.gson.boot.model.pojos.Role;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import javax.transaction.Transactional;

public interface GongNengDao extends CrudRepository<Gong,Integer> {

    //修改功能所处的功能组
    @Transactional
    @Modifying(clearAutomatically = true)
    @Query(nativeQuery = true,value = "update gong_ set sort_id=?1 where gong_id2=?2")
    public void updategnGnz(Integer sortId, Integer gongId2);
}
